﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
using Spectro.DAL.Users;

namespace Spectro.DAL
{
    public class Repository : TableServiceContext
    {
        public Repository(string baseAddress, StorageCredentials credentails):base(baseAddress, credentails)
        {

        }

        public IQueryable<User> Users
        {
            get
            {
                return this.CreateQuery<User>("Users");
            }
        }

        public void AddUsers(User user)
        {
            this.AddObject("Users", user);
            this.SaveChanges();
        }
    }
}
